home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’93 / Listen to your hack…beat / midistuff.h < prev    next >
Text File  |  1993-06-18  |  2KB  |  79 lines

  1. /***
  2.  * midistuff.h
  3.  *
  4.  *            Make sounds from the debugger over midi
  5.  *
  6.  *        by Bernie Bernstein for and entirely during MacHack '93 (June 16-18)
  7.  ***/
  8.  
  9.  
  10. /*** uncomment the one that you need or do the define from somewhere else ***/
  11.  
  12. /* SONICAPP if you are linking this to an application */
  13. //#define SONICAPP
  14.  
  15. /* SONICDCMD if you are building the dcmd */
  16. //#define SONICDCMD
  17.  
  18. /* SONICINIT if you are building the init */
  19. //#define SONICINIT
  20.  
  21.  
  22. /* Resource ID */
  23.  
  24.  
  25.  
  26. /* MIDI constants */
  27.  
  28. #define kStartSignature        'SNDA'
  29. #define kEndSignature        'SNDZ'
  30. #define kMaxClients            16
  31. #define refCon0                0L
  32. #define outputPortBuffSize    300
  33.  
  34. //#define outputPortID        'Aout'
  35. //#define inputPortID        'Bin '
  36.  
  37. //#define inputPortID        'Bin '
  38. //#define outputPortID        'Cout'
  39.  
  40. #define inputPortID            'in  '
  41. #define outputPortID        'out '
  42.  
  43.  
  44. #define errNoMIDIManager    -26002
  45. #define    kIconSize            256
  46. #define kIconID                8888
  47.  
  48. typedef struct SonicGlobs
  49.     {
  50.     Boolean        soundEnabled;
  51.     Boolean        manualPatch;
  52.     short        outputRefNum;
  53.     OSErr        clientID;
  54.     Handle        iconHdl;
  55.     Boolean        gotIcon;
  56.     }
  57. SonicGlobs, *SonicGlobPtr;
  58.  
  59.  
  60.  
  61. /* midiplayer.c */
  62. #ifdef SONICDCMD
  63. pascal void CommandEntry(dcmdBlock *paramPtr);
  64. #endif
  65. void LoadIcon(void);
  66. void PreInitMidi(void);
  67. void InitMidi(void);
  68. void KillMidi(void);
  69. OSErr MIDIManagerSignup(void);
  70. OSErr MIDIManagerConnect(void);
  71. OSErr StartNote(char channel, char pitch, char velocity);
  72. OSErr StopNote(char channel, char pitch);
  73. OSErr SetPanPot(char channel, char position);
  74. OSErr SetProgramChannel(char channel, char voice);
  75. OSErr SilenceAll(void);
  76. char *Pstrcat(register unsigned char *, register unsigned char *);
  77. char *Pstrcpy(register unsigned char *, register unsigned char *);
  78. short Pstrcmp(register Str255, register Str255);
  79.